Optimal. Leaf size=82 \[ \frac {b (2 a+b) \tan ^3(c+d x)}{3 d}-\frac {b (2 a+b) \tan (c+d x)}{d}+x (a+b)^2+\frac {b^2 \tan ^7(c+d x)}{7 d}-\frac {b^2 \tan ^5(c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3661, 1154, 203} \[ \frac {b (2 a+b) \tan ^3(c+d x)}{3 d}-\frac {b (2 a+b) \tan (c+d x)}{d}+x (a+b)^2+\frac {b^2 \tan ^7(c+d x)}{7 d}-\frac {b^2 \tan ^5(c+d x)}{5 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 1154
Rule 3661
Rubi steps
\begin {align*} \int \left (a+b \tan ^4(c+d x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (a+b x^4\right )^2}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \left (-b (2 a+b)+b (2 a+b) x^2-b^2 x^4+b^2 x^6+\frac {(a+b)^2}{1+x^2}\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac {b (2 a+b) \tan (c+d x)}{d}+\frac {b (2 a+b) \tan ^3(c+d x)}{3 d}-\frac {b^2 \tan ^5(c+d x)}{5 d}+\frac {b^2 \tan ^7(c+d x)}{7 d}+\frac {(a+b)^2 \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=(a+b)^2 x-\frac {b (2 a+b) \tan (c+d x)}{d}+\frac {b (2 a+b) \tan ^3(c+d x)}{3 d}-\frac {b^2 \tan ^5(c+d x)}{5 d}+\frac {b^2 \tan ^7(c+d x)}{7 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.58, size = 75, normalized size = 0.91 \[ \frac {105 (a+b)^2 \tan ^{-1}(\tan (c+d x))+b \tan (c+d x) \left (35 (2 a+b) \tan ^2(c+d x)-105 (2 a+b)+15 b \tan ^6(c+d x)-21 b \tan ^4(c+d x)\right )}{105 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.62, size = 81, normalized size = 0.99 \[ \frac {15 \, b^{2} \tan \left (d x + c\right )^{7} - 21 \, b^{2} \tan \left (d x + c\right )^{5} + 35 \, {\left (2 \, a b + b^{2}\right )} \tan \left (d x + c\right )^{3} + 105 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} d x - 105 \, {\left (2 \, a b + b^{2}\right )} \tan \left (d x + c\right )}{105 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 31.86, size = 1181, normalized size = 14.40 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 134, normalized size = 1.63 \[ \frac {b^{2} \left (\tan ^{7}\left (d x +c \right )\right )}{7 d}-\frac {b^{2} \left (\tan ^{5}\left (d x +c \right )\right )}{5 d}+\frac {2 a b \left (\tan ^{3}\left (d x +c \right )\right )}{3 d}+\frac {b^{2} \left (\tan ^{3}\left (d x +c \right )\right )}{3 d}-\frac {2 a b \tan \left (d x +c \right )}{d}-\frac {b^{2} \tan \left (d x +c \right )}{d}+\frac {\arctan \left (\tan \left (d x +c \right )\right ) a^{2}}{d}+\frac {2 \arctan \left (\tan \left (d x +c \right )\right ) a b}{d}+\frac {\arctan \left (\tan \left (d x +c \right )\right ) b^{2}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.59, size = 91, normalized size = 1.11 \[ a^{2} x + \frac {2 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a b}{3 \, d} + \frac {{\left (15 \, \tan \left (d x + c\right )^{7} - 21 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3} + 105 \, d x + 105 \, c - 105 \, \tan \left (d x + c\right )\right )} b^{2}}{105 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 11.47, size = 109, normalized size = 1.33 \[ \frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (\frac {b^2}{3}+\frac {2\,a\,b}{3}\right )}{d}-\frac {b^2\,{\mathrm {tan}\left (c+d\,x\right )}^5}{5\,d}+\frac {b^2\,{\mathrm {tan}\left (c+d\,x\right )}^7}{7\,d}+\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (c+d\,x\right )\,{\left (a+b\right )}^2}{a^2+2\,a\,b+b^2}\right )\,{\left (a+b\right )}^2}{d}-\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (b^2+2\,a\,b\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.08, size = 116, normalized size = 1.41 \[ \begin {cases} a^{2} x + 2 a b x + \frac {2 a b \tan ^{3}{\left (c + d x \right )}}{3 d} - \frac {2 a b \tan {\left (c + d x \right )}}{d} + b^{2} x + \frac {b^{2} \tan ^{7}{\left (c + d x \right )}}{7 d} - \frac {b^{2} \tan ^{5}{\left (c + d x \right )}}{5 d} + \frac {b^{2} \tan ^{3}{\left (c + d x \right )}}{3 d} - \frac {b^{2} \tan {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a + b \tan ^{4}{\relax (c )}\right )^{2} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________